package com.common.baseException;

import com.common.baseException.ExceptionEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @ClassName ShardingException
 * @Description TODO
 * @Author 张晓焕
 * @Date 2022/6/14 16:32
 * @Version 1.0
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class ShardingException extends RuntimeException{
    private Integer code;
    private String msg;
    public ShardingException(ExceptionEnum exceptionEnum){
        this.code= exceptionEnum.getCode();
        this.msg = exceptionEnum.getMsg();
    }
}
